package com.dnjn.happiness.system.api;

import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import com.dnjn.happiness.system.api.factory.RemoteConfigFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteConfigService",value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteConfigFallbackFactory.class)
public interface RemoteConfigService {

    @GetMapping("/config/getThresholdDataApi")
    public R<String> getThresholdDateaApi(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping(value = "/config/configKeyApi/{configKey}")
    public R<String> configKeyApi(@PathVariable("configKey") String configKey,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
